package cn.itcast.consumer;

import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;

//@EnableCircuitBreaker
//@SpringBootApplication

// 开启FeignClient的扫描功能，默认从当前类所在的包
@SpringCloudApplication
public class ConsumerApplication {
    public static void main(String[] args) {
        SpringApplication.run(ConsumerApplication.class, args);
    }
    // 注册RestTemplate的对象到Spring的容器中
   /* @Bean
    @LoadBalanced
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }*/

    /*@Bean
    public IRule rule(){
        return new RandomRule();
    }*/

   /* @Bean
    public UserClientFallback userClientFallback(){
        return new UserClientFallback(){
            @Override
            public User queryUserById(Long id) {
                User user = new User();
                user.setId(id);
                user.setName("呵呵");
                return user;
            }
        };
    }*/
}